package org.supda.system.util;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module;

public class HibernateAwareObjectMapper extends ObjectMapper {

	private static final long serialVersionUID = -8096645602889981915L;

	public HibernateAwareObjectMapper() {
        
		Hibernate4Module hibernate4Module = new Hibernate4Module();
		
		registerModule(hibernate4Module);
		
		//关闭空对象转json
		this.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
    }
}